package com.lyf.scm.admin.domain.service;

import com.lyf.scm.admin.api.dto.*;
import com.lyf.scm.common.model.ExcelExportDTO;
import com.lyf.scm.common.model.ExcelExportDataDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

/**
 * 需求计划
 *
 * @author wangchlei
 * @date 2020/10/26
 */
public interface RequirementPlanService {
    PlanResponseDTO<RequirementPlanInfoDTO> listWeekBySelective(RequirementPlanDTO requirementPlanDTO);

    void updateConfirmQty(List<RequirementConfirmationDTO> requirementConfirmationDTOs,Long unitType);

    EChartsDTO eChartsData(RequirementPlanDTO requirementPlanDTO);

    /**
     * 导出excel
     * @return {@link feign.Response}
     */
    //ExcelExportDataDTO exportExcel(ExcelExportDTO excelExportDTO, Integer type);

    Map<String, String> listAllPlanTypes();

    Boolean importExcel(MultipartFile file,Long unitType);

    /**
     * 更新确认量
     *
     * @param directly
     * @param unitType
     * @param logRecord
     * @return
     */
    void updateConfirm(List<RequirementConfirmationDTO> directly, Long unitType, OperationLogRecordDTO logRecord);

    /**
     * 保存导出的日志，异步导出
     *
     * @param excelExportDTO
     * @param type
     * @return
     */
    OperationLogRecordDTO saveOperatorLog(ExcelExportDTO excelExportDTO, Integer type);

    void createExportFile(OperationLogRecordDTO operationDto, ExcelExportDTO excelExportDTO, Integer type,Long userId);
}
